package com.coolingme.limit;

/**
 * 限制泛型类型为 Animal类的子类
 *
 * @author wangyue
 * @date 2019/4/4 11:03
 */
public class LimitGenericty<T extends Animal> {

    private T t;

    public LimitGenericty(T t) {
        this.t = t;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    public void hello() {
        System.out.println("t的类型为:" + t.getClass().getName());
    }
}
